//#include "IGalaxy.hh"
//
//using namespace World;
//
//void IGalaxy::to_xml(QDomNode& parent) const {
//    QDomDocument doc = parent.ownerDocument();
//    QDomElement playersElem = doc.createElement("players");
//    QDomElement starsElem = doc.createElement("stars");
//    parent.appendChild(playersElem);
//    parent.appendChild(starsElem);
//    PlayerMap players = get_players();
//    StarMap stars = get_stars();
//
//    for (
//      PlayerMap::const_iterator player = players.begin();
//      player != players.end();
//      ++player
//    ) {
////        player->to_xml(playersElem);
//    }
//
//    for (
//      StarMap::const_iterator star = stars.begin();
//      star != stars.end();
//      ++star
//    ) {
////        star->to_xml(starsElem);
//    }
//}
//
//void from_xml(QDomElement const& elem, Allocator& alloc) {
//    QDomElement const playersElem = elem.firstChildElement("players");
//    QDomElement const starsElem = elem.firstChildElement("stars");
//    QDomElement playerElem = playersElem.firstChildElement("player");
//    QDomElement starElem = starsElem.firstChildElement("star");
//
//    while (!playerElem.isNull()) {
//        spIPlayer player = alloc.create_player();
//
//        PlayerInfo player(playerElem);
//        players.insert(player.name, player);
//        playerElem = playerElem.nextSiblingElement("player");
//    }
//
//    while (!starElem.isNull()) {
//        StarInfo star(starElem);
//        stars.insert(star.id, star);
//        starElem = starElem.nextSiblingElement("star");
//    }
//}
